<include file="public/header_m"/>

<div class="am-cf admin-main">
  <!-- sidebar start -->
    <include file="public/sidebar_m"/>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="admin-content">
    <div class="am-cf am-padding">
      <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">账号信息</strong></div>
        {$desc}
    </div>
    <hr/>
    <div class="am-g">

      <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4" style="float: right;">
        <form class="am-form am-form-horizontal" method="post" action="__URL__/create2" onsubmit="return checkForm()" id="form2" name="form2">
          <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">账号</label>
            <div class="am-u-sm-9">
                <input type="text" id="user" name="user" placeholder="请输入账号">
            </div>
        </div>

          <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">密码</label>
            <div class="am-u-sm-9">
              <input type="password" id="pwd" name="pwd" placeholder="输入密码">
            </div>
          </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">电话</label>
                <div class="am-u-sm-9">
                    <input type="tel" id="phone" name="phone" placeholder="请输入手机">
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">角色</label>
                <div class="am-u-sm-9">
                    <select name="select" id="select">
                        <foreach name="datas" item="data">
                            <option value="{$data.rid}">{$data.rolename}</option>
                        </foreach>
                    </select>
                </div>
            </div>

          <div class="am-form-group">
            <label class="am-u-sm-3 am-form-label">简介</label>
            <div class="am-u-sm-9">
              <textarea class="" rows="5" id="intro" name="intro" placeholder="可输入简介"></textarea>
            </div>
          </div>

          <div class="am-form-group">
            <div class="am-u-sm-9 am-u-sm-push-3">
              <button type="submit" class="am-btn am-btn-primary">添加</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- content end -->
</div>
<script>
    function checkForm() {
        var addform2 = document.form2;
        if (addform2.user.value == "") {
            alert("请填写账号!");
            addform2.user.focus();   //用户名输入框获得焦点
            return false;   //不提交表单
        }
        if (addform2.pwd.value == "") {
            alert("请填写密码!");
            addform2.pwd.focus();   //用户名输入框获得焦点
            return false;   //不提交表单
        }
        return true;
    }
</script>
<include file="public/footer_m"/>
